package com.jiuwei.threadtest1.mapper;

import com.jiuwei.threadtest1.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;

@Mapper
public interface DownLoadMapper {
    /**
     * 查询所有的用户
     * @return
     */
    @Select("select * from threadtest.user")
    ArrayList<User> getAllUser();

    /**
     * 查询数据总数
     * @return
     */
    @Select("select count(*) from threadtest.user")
    int selectCount();

    /**
     * 根据id查询用户
     * @param start
     * @param pagesize
     * @return
     */
    ArrayList<User> getUserById(int start, int pagesize);
}
